1. Field of the Invention
This invention relates to a standby redundancy system of a programmable controller used with industrial machines, etc., the standby redundancy system being made up of a control CPU unit for actually controlling controlled machines and a standby CPU unit for controlling the controlled machines successively when the control CPU unit goes down for some reason so that the control and standby CPU units can be made the same in files, control information, and the operation mode.
2. Description of the Related Art
FIG. 10 is a block diagram to show the configuration of a conventional standby redundancy system shown in Japanese Patent Laid-Open No. Hei 2-81101, for example.
In the figure, numeral 10 is a control CPU unit for controlling controlled machines online. Numeral 110 is a standby CPU unit for controlling the controlled machines instead of the control CPU unit 10 when the control CPU unit 10 fails, etc. Numeral 5 is a switch for switching the lines connecting input/output of the CPU units and the controlled machines, and numeral 6 is a transmission line for transferring information required for backup.
Input/output of the two CPU units is connected to the controlled machines through the switch 5.
The standby CPU unit 110 serves the feed of the backup function of the control CPU unit 10 although it does not execute actual control. Therefore, the standby CPU unit 110 has the same hardware configuration as the control CPU unit 10 and the CPU units are also have the same in data contained in the internal programs, etc.
Thus, the standby CPU unit 110 always receives tracking information from the control CPU unit 10 over the transmission line 6.
The tracked information includes input information indicating the controlled machine state, control output information, standard programs, intermediate result and result data of calculation of control algorithms executed by application programs, application programs, parameters used in control operations, etc.
Next, a general tracking technique will be discussed with reference to a flowchart in FIG. 11.
First, at step S1100, system information of the control CPU unit and device information of the control CPU unit having a range preset by the user before running are extracted and control goes to step S1101.
At step S1101, the information extracted in the control CPU unit is transferred to a tracking memory in the standby CPU unit.
At step S1102, the information transferred to the tracking memory in the standby CPU unit is reflected in either a device memory or a system memory.
However, the tracking shown in Japanese Patent Laid-Open No. Hei 2-81101 is only a technique for holding the identity of the data changed after the system is started up, namely, between the operating control CPU unit and the standby CPU unit.
Thus, the programs, data, etc., required when the system is started up cannot be tracked and their identity cannot be held between the control and standby CPU units.
Generally, data in a preset range of a memory area according to a parameter set by the user is to be tracked, thus data, etc., stored in areas different from the memory area storing the tracked data is not tracked as tracking data and the data identity cannot be held between the control and standby CPU units.
Thus, from the viewpoint of tracking reliability, a method described below is used to set programs and data between the control and standby CPU units.
A setting method of programs, data, etc., for executing communication functions such as file batch write means and device batch write means for the control and standby CPU units in the standby redundancy system will be discussed with reference to FIGS. 12 and 13A to 13C.
As described above, in the standby redundancy system, both the control and standby CPU units need to be made the same in programs and data.
Thus, in a STOP mode, a peripheral device is connected to the target CPU unit by a communication line and the file batch write means and the device batch write means in the CPU unit write the file contents and device information transferred from the peripheral device into the target memory, namely, either the device memory or program memory in response to a batch write request of programs, data, etc., from the peripheral device. At the write time, the CPU unit checks the controlled area, etc., of the written programs, data, etc. (Steps S1200 and S1201).
Upon normal completion of batch write command execution from the peripheral device, response data is prepared at step S1202 and a response indicating the completion is returned to the peripheral device at step S1203 (FIG. 13A).
Then, connection of the peripheral device is changed to the standby CPU unit (FIG. 13B) and the same write processing is executed for the standby CPU unit based on FIG. 10 (FIG. 13C).
Next, transfer of the file contents in the program memory, the device memory, and an external memory of the control CPU unit to the corresponding memories of the standby CPU unit (program memory, device memory, and external memory) will be discussed.
First, from the peripheral device, the file batch write means and the device batch write means are executed for the control CPU unit based on FIG. 12 (FIG. 13A) for once reading data in the control CPU unit into the peripheral device.
After this, connection of the peripheral device must be changed to the standby CPU unit (FIG. 13B) for writing the information read from the control CPU unit into the target memory of the standby CPU unit by the file batch write means and the device batch write means of the communication service functions (FIG. 13C).
To write the program files into the program memory of the target CPU unit in batch from the peripheral device, if the CPU unit operation mode is RUN, it needs to be changed to STOP.
The operation mode change from RUN to STOP or from STOP to RUN is made by manually changing an operation mode changeover switch of the standby CPU unit matching change in the control CPU unit operation mode to make the standby CPU unit operation mode the same as the control CPU unit operation mode in the standby redundancy system.
As described above, to provide the identity of data that cannot be tracked between the control and standby CPU units, a peripheral device needs to be connected separately to both the CPU units for holding the data identity; it is extremely intricate to provide the data identity.
Generally, to change a part of a program, the changed program is written from a peripheral device at the END processing time in the RUN mode. However, the capacity of the program that can be written from the peripheral device over a communication line is limited within the limited time of the END processing.
Further, due to recent trends in modular programming, if programs are put into modules and are associated closely with each other to form a larger program, it is often efficient from the viewpoint of work efficiency and program reliability to change the entire program part in one module block rather than a part of the program in the block.
Further, at the END processing time in the RUN mode, the RUN mode is changed to the STOP mode in which programs are written in batch from a peripheral device. Therefore, the controlled machines must be stopped and the work efficiency is lowered.
The tracking, which recognizes all the data in the setup range as tracking data, also recognizes unchanged data as tracking data, prolonging the time taken for the tracking.